package com.itheima;

import java.util.Scanner;

public class 查找字符 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一段字符串：");
        String nextLine = sc.nextLine();

        int count1 = 0;
        int count2 = 0;
        int count3 = 0;


        for (int i = 0; i < nextLine.length(); i++) {
            char sh = nextLine.charAt(i);

            if (sh > 'A' && sh < 'Z') {
                count1++;
            } else if (sh > 'a' && sh < 'z') {
                count2++;
            } else if (sh > '1' && sh < '9') {
                count3++;
            }
        }

        System.out.println(count1);
        System.out.println(count2);
        System.out.println(count3);
    }
}
